﻿using System.Collections.Generic;
using System.Linq;

namespace Monkey.Warrenty.EntityModel
{
    public partial class Employee
    {
        public List<Role> Roles { get; set; }

        public bool HasRole(string roleName)
        {
            return Id == 1 || Roles.Any(x => x.Name == roleName);
        }
    }
}
